home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / serial / callback.001 / callback~ / callback / lib / user / lookuser.c < prev    next >
C/C++ Source or Header  |  1996-07-18  |  281b  |  16 lines

  1.  
  2. #include "user.p"
  3.  
  4. unsigned lookuser(char *name)
  5. {
  6.     int
  7.     index;
  8.  
  9.     for (index = 0; index < nusers; index++)
  10.     {
  11.     if (!strcmp(name, user[index].name))    /* names match ? */
  12.         return (index);            /* then return its index */
  13.     }
  14.     return (index);                /* user not found */
  15. }
  16.